import request from "../utils/request";

export const yangpanAPI = (birDate, birTime) =>
  request({
    url: `/tianji/qimen/yangPanQiJu/${birDate}/${birTime}`,
    method: "get",
  });
// 阳盘起局
export const yinpanAPI = (birDate, birTime) =>
  request({
    url: `/tianji/qimen/yinPanQiJu/${birDate}/${birTime}`,
    method: "get",
  });
export const loginAPI = (data) =>
  request({
    url: "/api/customer/dologin",
    method: "post",
    data,
  });
export const yangkepanAPI = (birDate, birTime) =>
  request({
    url: `/tianji/qimen/yangKePanQiJu/${birDate}/${birTime}`,
    method: "get",
  });
export const shanxiangAPI = (juShu, time, year) =>
  request({
    url: `/tianji/qimen/getShanXiangQiMen/${juShu}/${time}/${year}`,
    method: "get",
  });
export const seleceOneAPI = (phone) =>
  request({
    url: `/api/customer/selectOne/${phone}`,
    method: "get",
  });
export const menGongYanGuaAPI = (
  kanmen,
  genmen,
  zhenmen,
  xunmen,
  limen,
  kunmen,
  duimen,
  qianmen
) =>
  request({
    url: `/tianji/qimen/menGongYanGua/${kanmen}/${genmen}/${zhenmen}/${xunmen}/${limen}/${kunmen}/${duimen}/${qianmen}`,
    method: "get",
  });

export const xingGongYanGuaAPI = (
  kanmen,
  genmen,
  zhenmen,
  xunmen,
  limen,
  kunmen,
  duimen,
  qianmen
) =>
  request({
    url: `/tianji/qimen/xingGongYanGua/${kanmen}/${genmen}/${zhenmen}/${xunmen}/${limen}/${kunmen}/${duimen}/${qianmen}`,
    method: "get",
  });

export const uploadDataAPI = (data) =>
  request({
    url: `/api/anli/addQMAnli`,
    data,
    method: "post",
  });

export const getAllQMAnliAPI = (phone) =>
  request({
    url: `/api/anli/getAllQMAnli/${phone}`,
    method: "get",
  });

export const getOneQMAnliAPI = (code) =>
  request({
    url: `/api/anli/getOneQMAnli/${code}`,
    method: "get",
  });

export const deleteQMAnliAPI = (code) =>
  request({
    url: `/api/anli/deleteQMAnli/${code}`,
    method: "get",
  });

export const getEssayAPI = (code) =>
  request({
    url: `/api/anli/getEssay/${code}`,
    method: "get",
  });

export const bigliurenAPI = (data) =>
  request({
    url: `/api/biglr/bigliuren`,
    data,
    method: "post",
  });
export const theYearSolarTermAPI = (year) =>
  request({
    url: `/tianji/qimen/theYearSolarTerm/${year}`,
    method: "get",
  });

export const getYearCycle = (year) =>
  request({
    url: `/tianji/qimen/getYearCycle/${year}`,
    method: "get",
  });

export const getXun = (Y, M, D, h, m, s) =>
  request({
    url: `/tianji/qimen/getXun/${Y}/${M}/${D}/${h}/${m}/${s}`,
    method: "get",
  });

// 紫微AI
export const ziWeiAIAPI = (data) =>
  request({
    url: "/fastgpt/chat/completions",
    method: "post",
    data,
  });

// 奇门遁甲AI案例保存
export const addAiContent = (data) =>
  request({
    url: `/soft/qmAI/addAiContent`,
    method: "post",
    data,
  });

// 奇门遁甲私人案例保存
export const addQiMenAnli = (data) =>
  request({
    url: `/api/anli/addQiMenAnli`,
    method: "post",
    data,
  });
export const getAIContentInfo = (phone) =>
  request({
    url: `/soft/qmAI/getInfo?phone=${phone}`,
    method: "get",
  });
